using UnityEngine;
using System.Runtime.InteropServices;

namespace NativeBox2D
{
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct ManifoldPoint
    {
        public Vector2 localPoint;
        public float   normalImpulse;
        public float   tangentImpulse;
        public int     id;
    }

    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct Manifold
    {
        [MarshalAs(UnmanagedType.ByValArray, SizeParamIndex=1, SizeConst=2)] 
        public ManifoldPoint[] points;
        public Vector2 localNormal;
        public Vector2 localPoint;
		[MarshalAs (UnmanagedType.I1)]
        ManifoldType   type;
        int            pointCount;
    }
}